package com.lw;

import lombok.Getter;
import lombok.ToString;

import java.awt.image.BufferedImage;

/**
 * 障碍物
 */
public class Obstacle {
    @Getter
    private int x,y;//坐标

    @Getter
    private int type;//障碍物类型

    @Getter
    private BufferedImage show = null;//障碍物图片

    private Background bg;//当前场景对象

    public Obstacle(int x, int y, int type, Background bg) {
        this.x = x;
        this.y = y;
        this.type = type;
        this.bg = bg;
        show = StaticValue.obstacle.get(type);
    }
}
